<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@page import="java.util.List"%>
<%@page import="java.util.ArrayList"%>
<%@page import="com.doone.telmarket.domain.Activity"%>
<%
	List<Activity> li = (List)session.getAttribute("list");

%>
	<%
		if(session.getAttribute("isAdminLogined")==null){
			return;
		}else{
			String isAddminLogined = session.getAttribute("isAdminLogined").toString();
			if(!("true".equals(isAddminLogined))){
				response.sendRedirect("login.jsp");
				return;
			}
		}
		
	%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<%@page import="java.text.SimpleDateFormat"%><html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>main</title>
<link rel="stylesheet" rev="stylesheet"
	href="${pageContext.request.contextPath}/css/admin/style-admin.css"
	type="text/css" media="all" />
<script type="text/javascript"
	src="${pageContext.request.contextPath}/ckeditor/ckeditor.js"></script>
<script type="text/javascript"
	src="${pageContext.request.contextPath}/ckeditor/ckeditor.js"></script>

<script src="${pageContext.request.contextPath}/js/jquery.js"
	type="text/javascript"></script>
<script
	src="${pageContext.request.contextPath}/js/jquery.ui.draggable.js"
	type="text/javascript"></script>
<script src="${pageContext.request.contextPath}/js/jquery.alerts.js"
	type="text/javascript"></script>
<script src="${pageContext.request.contextPath}/js/ajaxfileupload.js"
	type="text/javascript"></script>
<script src="${pageContext.request.contextPath}/js/serviceOpration.js"
	type="text/javascript"></script>
<link href="${pageContext.request.contextPath}/css/jquery.alerts.css"
	rel="stylesheet" type="text/css" media="screen" />
<style type="text/css">

.file{border:1px solid #333333;color:#666666;background:#eeeeee;font:normal 12px Tahoma;height:18px}
</style>





<script type="text/javascript">
		function modify(id,title,content,url,person,begin,end,image,bigimg){
			$("#title").val(title);
			$("#url").val(url);
			$("#content").val(content);
			$("#person").val(person);
			$("#begin").val(begin);
			$("#end").val(end);
			document.getElement("img1").src=$("#contextPath").val()+"/"+image;
			document.getElement("img2").src=$("#contextPath").val()+"/"+bigimg;
			$("#activityId").val(id);
		}

		
		
   </script>
</head>
<body>

<div style="z-index: 1;height: 1000">
<input id="contexpath" type="hidden" value="${pageContext.request.contextPath}">
<div class="MainDiv"><input type="hidden" id="contextPath" value="${pageContext.request.contextPath}">
<table width="99%" border="0" cellpadding="0" cellspacing="0"
	class="CContent">
	<tr>
		<th class="tablestyle_title">增值业务管理</th>
	</tr>
	<tr>
		<td class="CPanel">
		<table border="0" cellpadding="0" cellspacing="0" style="width: 100%">
			<tr>
				<td align="left">&nbsp;&nbsp;&nbsp;<a href="${pageContext.request.contextPath}/admin/setPromotion.jsp">新增精彩促销</a>
			<a href="${pageContext.request.contextPath}/admin/selectActivity2">编辑精彩促销</a></td>
			</tr>



			<tr align="center">
				<td class="TablePanel"></td>
			</tr>
			<tr>
				<TD width="100%">
				
				<fieldset style="height: 100%;" id="queryResult"><legend>查询结果</legend>
				<div id="serviceDiv" style="width: 80%">
				<table border="1px" id="serviceTab">
					<tr>
						<td width="300">标题</td>
						<td width="50">操作</td>
						<td width="50">操作</td>
					</tr>
					<%
						if(li!=null){
							SimpleDateFormat s = new SimpleDateFormat("yyyy-MM-dd");
							for(int i=0;i<li.size();i++){
								%>	
					<tr>
						<td><%=li.get(i).getTitle() %></td>
						<td><a href="${pageContext.request.contextPath}/admin/selectActivityById?id=<%=li.get(i).getId() %>">编辑</a></td>
						<td><a href="${pageContext.request.contextPath}/admin/deleteActivity?id=<%=li.get(i).getId() %>">删除</a></td>
					</tr>
								<%
							}
						}
					%>
				
				</table>
				</div>
				</fieldset>
				</TD>
			</TR>

		</TABLE>


		</td>
	</tr>
	<TR>
		<TD colspan="2" align="center" height="50px"></TD>
	</TR>
</TABLE>
</div></div>




</body>
</html>